home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 10
/
FM Towns Free Software Collection 10.iso
/
ms_dos
/
tool
/
m1024
/
pagem.awk
< prev
Wrap
Text File
|
1994-07-24
|
655b
|
41 lines
BEGIN {
t=(t)?t:8
l=(l)?l:50
lp=(lp)?lp:32
hp=(hp)?hp:34
FS="\t"
fn=toupper(ARGV[1])
sub(/^.*\\/,"",fn)
print fn >"/dev/stderr"
"kiroku $20 $0d$0a" | getline dt
close("kiroku $20 $0d$0a")
print "FM Print File"
}
NF>1 {
s=$1
for(i=1; i<NF; i++) {
ns=t-length(s)%t
s=s sprintf("%" ns "s","") $(i+1)
}
$0=s
}
{
if(NR % l == 1) {
if(NR != 1) print ""
print "T32r\x1f\x13fT" lp
printf ("%" hp "s%23s%-12s page %d\n", "", "", fn, ++p)
print "0d"
printf ("%" hp "s%s\n", "", dt)
print "\n"
}
print $0
if($0) print ""
}
END {
print ""
printf("Page=%d\n",p) >"/dev/stderr"
}